/// <license>
/// This software and are provided as-is and without  warranty. 
/// This is  free  software,  as long  as you  clearly  display
/// the original author and his company for at least  1  second
/// on the attached display. If you need a commercial   license 
/// in which you do not have these restrictions, please contact
/// us via our website.
/// 
/// Author: Mario Di Vece
/// Unosquare S.A. de C.V. Copyright (c) 2013
/// url: http://www.unosquare.com
/// </license>

namespace Unosquare.Labs.Drivers.Vizic
{
    /// <summary>
    /// Defines the touch response types
    /// </summary>
    public enum VizicTouchResponseTypes : byte
    {
        NoTouchData,
        PositionData,
        HomeIcon,
        BookIcon,
        MessageIcon,
        TelephoneIcon,
        SongIcon,
    }

    /// <summary>
    /// Standard acknowledged (ACK), not acknowledged (NACK) and Timeout responses.
    /// </summary>
    public enum VizicResponseCodes : byte
    {
        Success = 0x4F, // 79 dec, O ASCII
        Failure = 0x46  // 70 dec, F ASCII
    }

    /// <summary>
    /// Response codes for file operations.
    /// Note that these codes are always 2nd-to-last in the response.
    /// For most file commands (all except list files) there is a 2-byte response
    /// The Failure member is a pseudo-response code, meaning it is not
    /// returned by the GPU but by this driver
    /// </summary>
    public enum VizicFileResponseCodes : byte
    {
        OK = 0x00,
        DiskError = 0x01,
        InternalError = 0x02,
        NotReady = 0x03,
        NoFile = 0x04,
        NoPath = 0x05,
        InvalidName = 0x06,
        Denied = 0x07,
        NoAccess = 0x08,
        InvalidHandle = 0x09,
        WriteProtected = 0x0a,
        NotEnabled = 0x0c,
        NoFileSystem = 0x0d,
        InvalidParameter = 0x13,

        Failure = 0x46,
    }

    /// <summary>
    /// Defines the file modes in which the FileOpen method can access files.
    /// Create, OpenOrCreate and OpenOrTruncate do not allow
    /// performing Read or Write operations
    /// </summary>
    public enum VizicFileModes : byte
    {
        ReadOnly = 0x01,
        WriteOnly = 0x02,
        ReadWrite = 0x03,
        Create = 0x04,
        OpenOrCreate = 0x10,
        OpenOrTruncate = 0x08
    }

    /// <summary>
    /// Defines the multiple orientations and rotations available to the device
    /// </summary>
    public enum VizicOrientations : byte
    {
        HorizontalIL = 0x00,
        VertialIL = 0x01,
        HorizontalIR = 0x02,
        VerticalIT = 0x03
    }

    /// <summary>
    /// Defines the multiple Baud Rate options available to the device
    /// </summary>
    public enum VizicBaudRates : byte
    {
        B9600 = 0x00,
        B19200 = 0x01,
        B57600 = 0x02,
        B115200 = 0x03,
        B256K = 0x04,
        B500K = 0x05,
        B1M = 0x06,
        B2M = 0x07,
    }

    /// <summary>
    /// Defines the multiple font sizes available to the device
    /// </summary>
    public enum VizicFontSizes : byte
    {
        Size10 = 0x00,
        Size11 = 0x01,
        Size12 = 0x02,
        Size13 = 0x03,
        Size14 = 0x04,
        Size15 = 0x05,
        Size16 = 0x06,
        Size17 = 0x07,
    }
}
